const path = require('path')
const resolve = p => path.resolve(__dirname, p);
module.exports = {
  title: '乐荐医2.0',
  description: '项目开发文档',
  base: '/docs/',
  locales: {
    '/zh/': {
      title: '乐荐医2.0',
      lang: 'zh-CN',
      description: '基于Nuxtjs的项目开发文档',
    },
  },
  themeConfig: {
    lastUpdated: 'Last Updated',
    editLinks: true,
    serviceWorker: {
      updatePopup: {
        message: 'New content is available.',
        buttonText: 'Refresh',
      },
    },
    locales: {
      '/': {
        selectText: 'Languages',
        label: 'English',
        editLinkText: 'Edit this page on GitHub',
        nav: [
          { text: 'Changelog', link: 'https://github.com/ly525/luban-h5/releases' },
        ],
        sidebar: {
          '/': [
            {
              collapsable: false,
              title: '🚀 快速开始',
              children: [
                '/en/getting-started/introduction',
              ],
            },
          ],
        },
      },
      '/zh/': {
        selectText: '选择语言',
        label: '简体中文',
        editLinkText: '在 GitHub 上编辑此页',
        nav: [
          { text: '升级日志', link: 'https://github.com/ly525/luban-h5/releases' },
        ],
        sidebar: {
          '/': [
            {
              collapsable: false,
              title: '🚀 快速开始',
              children: [
                '/zh/getting-started/quick-start',
                '/zh/getting-started/styles',
              ],
            },
            {
              collapsable: false,
              title: '📗 组件文档',
              children: [
                '/zh/components/space',
                '/zh/components/countdown',
              ],
            },
            {
              collapsable: false,
              title: '📝 常见问题',
              children: [
                '/zh/getting-started/introduction',
              ],
            },
          ],
        },
      },
    },
  },
  plugins: [
    'demo-container',
    [
      '@vuepress/register-components',
      {
        components: [
          {
            name: 'l-space',
            path: resolve('../../src/components/space')
          },
          {
            name: 'l-countdown',
            path: resolve('../../src/components/countdown')
          }
        ]
      }
    ]
  ]
}
